#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
int main()
{
	int i = 0;
	int num = 0;
	for (int i = 1; i <= 100; i++)
	{
		int temp = i;
		while (temp)
		{
			if (temp % 10 == 9)
			{
				num++;
			}
			temp /= 10;
		}
	}
	printf("%d", num);
	return 0;
}